﻿using UnityEngine;
using System.Collections;
using System;
using System.IO;
using System.Text;

/// <summary>
/// Classe chamada ao se clicar em 'Play Game'.
/// </summary>
public class Game_Directory {
	
	#region Singleton
	private Game_Directory(){ CreateDirectory(); }
	
	private static Game_Directory instance;
	
	public static Game_Directory getInstance()
	{
		if (instance == null)
			instance = new Game_Directory();
		
		return instance;
	}
	#endregion
	
	private int reachedPhase = 1;
	private string pathString;	
	
	public void CreateDirectory()
	{		
		string path = Environment.GetFolderPath(Environment.SpecialFolder.Personal);
		string folderName = "Gravity-Cube";
		pathString = Path.Combine(path, folderName);
			
		//Cria uma pasta no Documentos do usuário		
		Directory.CreateDirectory(pathString);
		
		pathString = pathString + @"\GC.txt";
	}
	
	public int ReachedPhase {
		get { return reachedPhase;}
		set { if (value > reachedPhase) reachedPhase = value; }
	}
	
	public string PathString { get { return pathString; } }
}